From 4c8d59cc5db61144352fd9829ffe9df72c4c70e4 Mon Sep 17 00:00:00 2001 From: Luc Teirlinck Date: Thu, 20 May 2004 17:29:57 +0000 Subject: [PATCH] (lookup_char_property): Do not prematurely return nil. --- src/intervals.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/intervals.c b/src/intervals.c index d3f814d60ce..33ef9a34177 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -1899,11 +1899,13 @@ lookup_char_property (plist, prop, textprop) return fallback; /* Check for alternative properties */ tail = Fassq (prop, Vchar_property_alias_alist); - if (NILP (tail)) - return tail; - tail = XCDR (tail); - for (; NILP (fallback) && CONSP (tail); tail = XCDR (tail)) - fallback = Fplist_get (plist, XCAR (tail)); + if (! NILP (tail)) + { + tail = XCDR (tail); + for (; NILP (fallback) && CONSP (tail); tail = XCDR (tail)) + fallback = Fplist_get (plist, XCAR (tail)); + } + if (textprop && NILP (fallback) && CONSP (Vdefault_text_properties)) fallback = Fplist_get (Vdefault_text_properties, prop); return fallback; -- 2.30.2